<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="UTF-8">
  <meta 
    name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <meta 
    http-equiv="X-UA-Compatible" 
    content="ie=edge">
  <meta 
    name="theme-color" 
    content="#fff" 
    id="theme-color">
  <meta 
    name="description" 
    content="霜序廿的个人网站">
  <link 
    rel="icon" 
    href="https://api2.mubu.com/v3/photo/654b368e-b847-4122-982c-86d90b3f5275.jpg">
  <title>计算机博弈大赛军棋项目博弈协议 1.0版</title>
  
    
      <meta 
        property="og:title" 
        content="计算机博弈大赛军棋项目博弈协议 1.0版">
    
    
      <meta 
        property="og:url" 
        content="https://shuangxunian.github.io/2021/06/13/militaryChessAgreementInCGV1/index.html">
    
    
      <meta 
        property="og:img" 
        content="https://api2.mubu.com/v3/photo/654b368e-b847-4122-982c-86d90b3f5275.jpg">
    
    
      <meta 
        property="og:img" 
        content="国赛所遵循的版本，为自己构建新软件做准备">
    
    
      <meta 
        property="og:type" 
        content="article">
      <meta 
        property="og:article:published_time" 
        content="2021-06-13">
      <meta 
        property="og:article:modified_time" 
        content="2020-10-20">
      <meta 
        property="og:article:author" 
        content="霜序廿">
      
        
          <meta 
            property="og:article:tag" 
            content="其他">
        
      
    
  
  <script>
    function loadScript(url, cb) {
      var script = document.createElement('script');
      script.src = url;
      if (cb) script.onload = cb;
      script.async = true;
      document.body.appendChild(script);
    }
    function loadCSS(href, data, attr) {
      var sheet = document.createElement('link');
      sheet.ref = 'stylesheet';
      sheet.href = href;
      sheet.dataset[data] = attr;
      document.head.appendChild(sheet);
    }
    function changeCSS(cssFile, data, attr) {
      var oldlink = document.querySelector(data);
      var newlink = document.createElement("link");
      newlink.setAttribute("rel", "stylesheet");
      newlink.setAttribute("href", cssFile);
      newlink.dataset.prism = attr;
      document.head.replaceChild(newlink, oldlink);
    }
  </script>
  
    
      
      
      
      
        
        
        
        <script>
          function prismThemeChange() {
            if(document.getElementById('theme-color').dataset.mode === 'dark') {
              if(document.querySelector('[data-prism]')) {
                changeCSS('/js/lib/prism/prism-tomorrow.min.css', '[data-prism]', 'prism-tomorrow');
              } else {
                loadCSS('/js/lib/prism/prism-tomorrow.min.css', 'prism', 'prism-tomorrow');
              }
            } else {
              if(document.querySelector('[data-prism]')) {
                changeCSS('/js/lib/prism/prism.min.css', '[data-prism]', 'prism');
              } else {
                loadCSS('/js/lib/prism/prism.min.css', 'prism', 'prism');
              }
            }
          }
          prismThemeChange()
        </script>
      
      
        
        <link rel="stylesheet" href="/js/lib/prism/prism-line-numbers.min.css">
      
    
  
  <script>
    // control reverse button
    var reverseDarkList = {
      dark: 'light',
      light: 'dark'
    };
    var themeColor = {
      dark: '#1c1c1e',
      light: '#fff'
    }
    // get the data of css prefers-color-scheme
    var getCssMediaQuery = function() {
      return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
    };
    // reverse current darkmode setting function
    var reverseDarkModeSetting = function() {
      var setting = localStorage.getItem('user-color-scheme');
      if(reverseDarkList[setting]) {
        setting = reverseDarkList[setting];
      } else if(setting === null) {
        setting = reverseDarkList[getCssMediaQuery()];
      } else {
        return;
      }
      localStorage.setItem('user-color-scheme', setting);
      return setting;
    };
    // apply current darkmode setting
  </script>
  
    <script>
      var setDarkmode = function(mode) {
      var setting = mode || localStorage.getItem('user-color-scheme');
      if(setting === getCssMediaQuery()) {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
        prismThemeChange();
      } else if(reverseDarkList[setting]) {
        document.documentElement.setAttribute('data-user-color-scheme', setting);
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
        prismThemeChange();
      } else {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[getCssMediaQuery()];
        document.getElementById('theme-color').dataset.mode = getCssMediaQuery();
        prismThemeChange();
      }
    };
    setDarkmode();
    </script>
  
  
  <link rel="preload" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css" as="style" >
  <link rel="preload" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css" as="style" >
  
  
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.js" as="script">
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.css" as="style" >
  
  
    <link rel="preload" href="/js/lib/lozad.min.js" as="script">
  
  
  
  
  
  
  
  <link rel="stylesheet" href="/css/main.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css">
  
    <link rel="stylesheet" href="/js/lib/lightbox/baguetteBox.min.css">
  
<meta name="generator" content="Hexo 5.4.0"></head>

  <body>
    <div class="wrapper">
       
      <nav class="navbar">
  <div class="navbar-logo">
    <span class="navbar-logo-main">
      
        <img 
          class="navbar-logo-img" 
          src="https://api2.mubu.com/v3/photo/654b368e-b847-4122-982c-86d90b3f5275.jpg" 
          alt="blog logo">
      
      <span class="navbar-logo-dsc">霜序廿的个人网站</span>
    </span>
  </div>
  <div class="navbar-menu">
    
      <a 
        href="/" 
        class="navbar-menu-item">
        
          首页
        
      </a>
    
      <a 
        href="/archives" 
        class="navbar-menu-item">
        
          归档
        
      </a>
    
      <a 
        href="/tags" 
        class="navbar-menu-item">
        
          标签
        
      </a>
    
      <a 
        href="/categories" 
        class="navbar-menu-item">
        
          分类
        
      </a>
    
      <a 
        href="/about" 
        class="navbar-menu-item">
        
          关于
        
      </a>
    
      <a 
        href="/links" 
        class="navbar-menu-item">
        
          友链
        
      </a>
    
    <a 
      class="navbar-menu-item darknavbar" 
      id="dark">
      <i class="iconfont icon-weather"></i>
    </a>
    <a 
      class="navbar-menu-item searchnavbar" 
      id="search">
      <i 
        class="iconfont icon-search" 
        style="font-size: 1.2rem; font-weight: 400;">
      </i>
    </a>
  </div>
</nav> 
      
      <div 
        id="local-search" 
        style="display: none">
        <input
          class="navbar-menu-item"
          id="search-input"
          placeholder="请输入搜索内容..." />
        <div id="search-content"></div>
      </div>
      
      <div class="section-wrap">
        <div class="container">
          <div class="columns">
            <main class="main-column">
<article class="card card-content">
  <header>
    <h1 class="post-title">
      计算机博弈大赛军棋项目博弈协议 1.0版
    </h1>
  </header>
  <div class="post-meta post-show-meta">
    <time datetime="2021-06-13T13:48:56.193Z">
      <i 
        class="iconfont icon-calendar" 
        style="margin-right: 2px;">
      </i>
      <span>2021-06-13</span>
    </time>
    
      <span class="dot"></span>
      
        <a 
          href="/categories/%E5%85%B6%E4%BB%96/" 
          class="post-meta-link">
          其他
        </a>
      
    
    
      <span class="dot"></span>
      <span>2.4k 字</span>
    
  </div>
  
    <div 
      class="post-meta post-show-meta" 
      style="margin-top: -10px;">
      <div style="display: flex; align-items: center;">
        <i 
          class="iconfont icon-biaoqian" 
          style="margin-right: 2px; font-size: 1.15rem;">
        </i>
        
          
          <a 
            href="/tags/%E5%85%B6%E4%BB%96/" 
            class="post-meta-link">
            其他
          </a>
        
      </div>
    </div>
  
  </header>
  <div 
    id="section" 
    class="post-content">
    <h2 id="概述："><a href="#概述：" class="headerlink" title="概述："></a>概述：</h2><p>本协议为2012中国计算机博弈大赛军棋博弈项目协议。</p>
<h2 id="棋盘和棋子的编码约定："><a href="#棋盘和棋子的编码约定：" class="headerlink" title="棋盘和棋子的编码约定："></a>棋盘和棋子的编码约定：</h2><ol>
<li>棋盘棋位编码与布局规则<br>军棋棋盘共有12行5列60个棋位，行编码从上到下依次为A，B，C……K，L；列编码从左到右依次为0，1，2，3，4；每个棋位用行号和列号顺序表示见图1。<br>己方应在下方棋盘的棋位上布置棋子，对方在上方棋盘的棋位上布置棋子。    布阵时选手只能将己方的25枚棋子扣放在本方区域的兵站和大本营中（军旗必须放在大本营中；地雷必须放在最后两排；炸弹不能放在第一排，行营中不能布子。）</li>
</ol>
<p><img  srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://api2.mubu.com/v3/document_image/5769d855-cb9e-48e5-a024-001228dcb426-3807603.jpg" class="lozad post-image"src="https://api2.mubu.com/v3/document_image/5769d855-cb9e-48e5-a024-001228dcb426-3807603.jpg"></p>
<ol start="2">
<li>棋子编码：<br>棋子分为红方和黑方，每一方的棋子各25枚，司令、军长、军旗各一；师长、旅长、团长、营长、炸弹各二；连长、排长、工兵、地雷各三。各棋子的编码和数量见下表1。</li>
</ol>
<table>
<thead>
<tr>
<th>名称</th>
<th>司令</th>
<th>军长</th>
<th>师长</th>
<th>旅长</th>
<th>团长</th>
<th>营长</th>
<th>连长</th>
<th>排长</th>
<th>工兵</th>
<th>地雷</th>
<th>炸弹</th>
<th>军旗</th>
</tr>
</thead>
<tbody><tr>
<td>编号</td>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
<td>f</td>
<td>g</td>
<td>h</td>
<td>i</td>
<td>j</td>
<td>k</td>
<td>l</td>
</tr>
<tr>
<td>数量</td>
<td>1</td>
<td>1</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2</td>
<td>1</td>
</tr>
</tbody></table>
<ol start="3">
<li>对局规则：<br>布局结束后，红方先行一着，如果发生碰子由裁判将碰棋输赢结果通知双方，然后双方轮流行棋，直到根据和棋或输赢规则结束棋局。<br>（1）行棋规则<br>军旗和地雷不可移动，在大本营里的棋子不可移动，其它棋子可以移动。<br>棋子沿公路线移动时每次只能走到相邻的停靠点；<br>工兵沿铁路线移动时可不限格数直行或转弯到达铁路线上未被阻挡的任何兵站，其它棋子沿铁路线移动时不可转弯只可不限格数沿直线移动到未被阻挡的兵站。<br>棋子不能碰行营中的棋子。<br>（2）碰子规则<br>基本碰子规则是双方棋子相碰时军阶低的棋子战败被吃掉（移出棋盘），如果两个棋子级别相同则同归于尽（双方棋子移出棋盘）。具体碰子胜败可参照表1。<br>炸弹碰到对方任何棋子时同归于尽（包括军旗和地雷）。<br>地雷被工兵碰到时被工兵吃掉，被炸弹碰到时同归于尽，被其它棋子碰到时可吃掉其它棋子。<br>若司令被吃掉或同归于尽，则无司令的选手需亮出军旗所在位置。</li>
</ol>
<table>
<thead>
<tr>
<th>攻守</th>
<th>司令</th>
<th>军长</th>
<th>师长</th>
<th>旅长</th>
<th>团长</th>
<th>营长</th>
<th>连长</th>
<th>排长</th>
<th>工兵</th>
<th>炸弹</th>
</tr>
</thead>
<tbody><tr>
<td>司令</td>
<td>同尽</td>
<td>军长败</td>
<td>师长败</td>
<td>旅长败</td>
<td>团长败</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>军长</td>
<td>军长败</td>
<td>同尽</td>
<td>师长败</td>
<td>旅长败</td>
<td>团长败</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>师长</td>
<td>师长败</td>
<td>师长败</td>
<td>同尽</td>
<td>旅长败</td>
<td>团长败</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>旅长</td>
<td>旅长败</td>
<td>旅长败</td>
<td>旅长败</td>
<td>同尽</td>
<td>团长败</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>团长</td>
<td>团长败</td>
<td>团长败</td>
<td>团长败</td>
<td>团长败</td>
<td>同尽</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>营长</td>
<td>营长败</td>
<td>营长败</td>
<td>营长败</td>
<td>营长败</td>
<td>营长败</td>
<td>同尽</td>
<td>连长败</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>连长</td>
<td>连长败</td>
<td>连长败</td>
<td>连长败</td>
<td>连长败</td>
<td>连长败</td>
<td>连长败</td>
<td>同尽</td>
<td>排长败</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>排长</td>
<td>排长败</td>
<td>排长败</td>
<td>排长败</td>
<td>排长败</td>
<td>排长败</td>
<td>排长败</td>
<td>排长败</td>
<td>同尽</td>
<td>工兵败</td>
<td>同尽</td>
</tr>
<tr>
<td>工兵</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>工兵败</td>
<td>同尽</td>
<td>同尽</td>
</tr>
<tr>
<td>地雷</td>
<td>司令败</td>
<td>军长败</td>
<td>师长败</td>
<td>旅长败</td>
<td>团长败</td>
<td>营长败</td>
<td>连长败</td>
<td>排长败</td>
<td>地雷败</td>
<td>同尽</td>
</tr>
<tr>
<td>炸弹</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
<td>同尽</td>
</tr>
<tr>
<td>军旗</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>军旗败</td>
<td>同尽</td>
</tr>
</tbody></table>
<p>  （3）和棋或胜负判定规则<br>  结束对局后，按以下顺序优先判定胜负：<br>  行棋着法非法的一方为负；<br>  双方都无棋可走为和棋，只有一方无棋可走的一方为负；<br>  军旗被吃或被炸的一方为负；<br>  某一方行棋累计时间先超过30分钟为负；<br>  双方连续31步未碰子时当前行棋方为负；（由于普遍认为防守方略占优势，为了减少平局和互不进攻的僵局，鼓励主动进攻，建议31步内必须碰子）。</p>
<h2 id="协议使用示例："><a href="#协议使用示例：" class="headerlink" title="协议使用示例："></a>协议使用示例：</h2><pre class="line-numbers language-none"><code class="language-none">INFO 1.0									    裁判告知选手协议版本，询问参赛选手信息
NAME 参赛选手姓名						            选手回复姓名
START 1 1800 31							        裁判告知选手行棋先后顺序，每局时限，必攻步数
ARRAY abccddeeffggghhhiiijjkklj			        选手回复布局序列
GO 0000 0 00								    裁判告知先行选手可行棋
BESTMOVE G0F0						            选手回复己方行棋着法
RESULT 0 00								        裁判告知选手行棋结果和对方军旗位置
GO F4G4 1 00								    裁判告知选手对方行棋着法、结果和军旗位置
BESTMOVE F0E0						            选手回复己方行棋着法
RESULT 2 A1								        裁判告知选手己方行棋结果和对方军旗位置
GO E4F4 3 A1							        裁判告知选手对方行棋着法、结果和军旗位置
…										    	…
END	1									        裁判告知选手博弈结束<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<h2 id="协议指令解释："><a href="#协议指令解释：" class="headerlink" title="协议指令解释："></a>协议指令解释：</h2><ol>
<li>INFO ver<br> 裁判告知选手所采用的协议版本，当前版本为1.0。<br> 例如：INFO 1.0</li>
<li>NAME player<br> 选手回复姓名。<br> 例如：NAME HarbinUniversityOfScienceAndTechnology</li>
<li>START first time steps<br> 裁判告知选手行棋先后顺序、每局时限、必攻步数；<br> first=0为先手行棋，first=1为后手行棋；<br> time为每局选手可用时间，单位秒；<br> 相互不碰子的局面持续达到steps时，行棋方为负。<br> 例如：START 0 1800 31</li>
<li>ARRAY list<br> 选手回复布局序列；<br> list为选手布局棋子从上到下每行棋子的序列，棋子编号应用小写字母表示，中间不要有空格或换行的字符信息。<br> 例如：ARRAY abccddeeffggghhhiiijjkklj</li>
<li>GO move result flag<br> 裁判告知选手对方行棋着法和行棋结果和对方军旗位置<br> move 为对方行棋着法由4个字符组成，依次为起点行号、起点列号、终点行号、终点列号；如果move=0000则表示通知先手行棋<br> result=0为对方行棋后对方棋子被吃掉，1为吃掉己方棋子，2为对死，3为仅移动；<br> flag表示对方军旗位置行号和列号，如果flag=00则表示对方司令尚存军旗位置未知。<br> 例如：GO 0000 0 00    表示对方布局结束，通知先行选手可以行棋<br> 或者：GO F0G0 0 00    表示对方将F0棋子行至G0，被己方吃掉，对方军旗位置未知<br> 或者：GO F2G2 1 00    表示对方将F2棋子行至G2，吃掉己方棋子，对方军旗位置未知<br> 或者：GO F4G4 2 A3    表示对方将F4棋子行至G4，双方对死，对方军旗位置A3<br> 或者：GO F3F4 3 A3    表示对方将F3棋子行至F4，仅移动，对方军旗位置A3</li>
<li>BESTMOVE move<br> 选手回复己方行棋着法；<br> move 为对方行棋着法由4个字符组成，依次为起点行号、起点列号、终点行号、终点列号；其中行号应为大写英文字母。<br> 例如：BESTMOVE GOF0    表示己方将GO棋子行至F0</li>
<li>RESULT result flag<br> 裁判告知选手己方行棋结果和对方军旗位置<br> result=0为己方行棋后被对方棋子吃掉，1为吃掉对方棋子，2为对死，3为仅移动；<br> flag表示对方军旗位置行号和列号，如果flag=00则表示对方司令尚存军旗位置未知。<br> 例如：RESULT 0 00        表示己方本轮行动的棋子被对方吃掉，对方军旗位置未知<br> 或者：RESULT 1 A1        表示己方本轮行动的棋子吃掉对方棋子，对方军旗位置A1<br> 或者：RESULT 2 A1        表示己方本轮行动的棋子与对方棋子对死，对方军旗位置A1<br> 或者：RESULT 3 A1        表示己方本轮行动的棋子未碰到对方棋子，对方军旗位置A1</li>
<li>END win<br> 裁判告知选手博弈结果<br> win=0表示选手战败，1表示获胜，2表示非正常结束<br> 例如：END 0    表示选手战败<br> 或者：END 1    表示选手获胜<br> 或者：END 2    表示非正常结束</li>
</ol>
<h2 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h2><ol>
<li>选手引擎程序可通过标准输入输出流（例如cin和cout）以行为单位接受和发送指令。</li>
<li>指令和参数之间以一个空格分隔。</li>
<li>竞赛平台可发出的指令为：INFO、START、GO、RESULT和END,选手引擎程序可发出的指令为：NAME、ARRAY、BESTMOVE。</li>
<li>具体指令用法可参考示例程序(示例程序仅供参考协议指令交互内容,选手应改进信息函数CulInfo、布局函数CulArray和行棋函数CulBestmove) 。</li>
<li>其他问题反馈和建议请联系<a href="mailto:&#109;&#101;&#x69;&#x78;&#105;&#97;&#110;&#x40;&#104;&#114;&#x62;&#x75;&#x73;&#x74;&#x2e;&#101;&#100;&#x75;&#46;&#99;&#110;">&#109;&#101;&#x69;&#x78;&#105;&#97;&#110;&#x40;&#104;&#114;&#x62;&#x75;&#x73;&#x74;&#x2e;&#101;&#100;&#x75;&#46;&#99;&#110;</a></li>
</ol>
<h2 id="发布时间："><a href="#发布时间：" class="headerlink" title="发布时间："></a>发布时间：</h2><p>2012-3-31</p>

  </div>
  <div>
    
  </div>
</article>
<div class="nav">
  
    <div class="nav-item-prev">
      <a 
        href="/2021/06/13/NginxFirewallModuleDevelopmentSummary/" 
        class="nav-link">
        <i class="iconfont icon-left nav-prev-icon"></i>
        <div>
          <div class="nav-label">上一篇</div>
          
            <div class="nav-title">nginx 防火墙模块开发总结 </div>
          
        </div>
      </a>
    </div>
  
  
    <div class="nav-item-next">
      <a 
        href="/2021/06/13/MIAIsCurriculum/" 
        class="nav-link">
        <div>
          <div class="nav-label">下一篇</div>
          
            <div class="nav-title">小爱课程表~ </div>
          
        </div>
        <i class="iconfont icon-right nav-next-icon"></i>
      </a>
    </div>
  
</div>

<div 
  class="card card-content toc-card" 
  id="mobiletoc">
  <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E8%BF%B0%EF%BC%9A"><span class="toc-text">概述：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A3%8B%E7%9B%98%E5%92%8C%E6%A3%8B%E5%AD%90%E7%9A%84%E7%BC%96%E7%A0%81%E7%BA%A6%E5%AE%9A%EF%BC%9A"><span class="toc-text">棋盘和棋子的编码约定：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B%EF%BC%9A"><span class="toc-text">协议使用示例：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E6%8C%87%E4%BB%A4%E8%A7%A3%E9%87%8A%EF%BC%9A"><span class="toc-text">协议指令解释：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9"><span class="toc-text">注意事项</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%91%E5%B8%83%E6%97%B6%E9%97%B4%EF%BC%9A"><span class="toc-text">发布时间：</span></a></li></ol>
</div></main>
            <aside class="left-column">
              
              <div class="card card-author">
                
  <img 
    src="https://api2.mubu.com/v3/photo/654b368e-b847-4122-982c-86d90b3f5275.jpg" 
    class="author-img" 
    alt="author avatar">

<p class="author-name">霜序廿</p>
<p class="author-description">无限进步</p>
<div class="author-message">
  <a 
    class="author-posts-count" 
    href="/archives">
    <span>253</span>
    <span>文章</span>
  </a>
  <a 
    class="author-categories-count" 
    href="/categories">
    <span>6</span>
    <span>分类</span>
  </a>
  <a 
    class="author-tags-count" 
    href="/tags">
    <span>51</span>
    <span>标签</span>
  </a>
</div>

  <div class="author-card-society">
    
      <div class="author-card-society-icon">
        <a target="_blank" rel="noopener" href="https://github.com/shuangxunian">
          <i class="iconfont icon-github society-icon"></i>
        </a>
      </div>
    
      <div class="author-card-society-icon">
        <a target="_blank" rel="noopener" href="https://space.bilibili.com/391117803">
          <i class="iconfont icon-bilibili society-icon"></i>
        </a>
      </div>
    
  </div>

              </div>
               <div class="sticky-tablet">
  
  
    <article class="display-when-two-columns spacer">
      <div class="card card-content toc-card">
        <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E8%BF%B0%EF%BC%9A"><span class="toc-text">概述：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A3%8B%E7%9B%98%E5%92%8C%E6%A3%8B%E5%AD%90%E7%9A%84%E7%BC%96%E7%A0%81%E7%BA%A6%E5%AE%9A%EF%BC%9A"><span class="toc-text">棋盘和棋子的编码约定：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B%EF%BC%9A"><span class="toc-text">协议使用示例：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E6%8C%87%E4%BB%A4%E8%A7%A3%E9%87%8A%EF%BC%9A"><span class="toc-text">协议指令解释：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9"><span class="toc-text">注意事项</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%91%E5%B8%83%E6%97%B6%E9%97%B4%EF%BC%9A"><span class="toc-text">发布时间：</span></a></li></ol>
      </div>
    </article>
  
  
  <article class="card card-content categories-widget">
    <div class="categories-card">
  <div class="categories-header">
    <i 
      class="iconfont icon-fenlei" 
      style="padding-right: 2px;">
    </i>分类
  </div>
  <div class="categories-list">
    
      <a href="/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/">
        <div class="categories-list-item">
          技术文章
          <span class="categories-list-item-badge">218</span>
        </div>
      </a>
    
      <a href="/categories/%E5%85%B6%E4%BB%96/">
        <div class="categories-list-item">
          其他
          <span class="categories-list-item-badge">16</span>
        </div>
      </a>
    
      <a href="/categories/%E6%97%85%E6%B8%B8/">
        <div class="categories-list-item">
          旅游
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
      <a href="/categories/%E7%AE%97%E6%B3%95/">
        <div class="categories-list-item">
          算法
          <span class="categories-list-item-badge">8</span>
        </div>
      </a>
    
      <a href="/categories/%E8%80%83%E8%AF%95/">
        <div class="categories-list-item">
          考试
          <span class="categories-list-item-badge">8</span>
        </div>
      </a>
    
      <a href="/categories/%E9%98%85%E8%AF%BB/">
        <div class="categories-list-item">
          阅读
          <span class="categories-list-item-badge">1</span>
        </div>
      </a>
    
  </div>
</div>
  </article>
  
  <article class="card card-content tags-widget">
    <div class="tags-card">
  <div class="tags-header">
    <i 
      class="iconfont icon-biaoqian" 
      style="padding-right: 2px;">
    </i>热门标签
  </div>
  <div class="tags-list">
    
      <a 
        href="/tags/js/" 
        title="js">
        <div class="tags-list-item">js</div>
      </a>
    
      <a 
        href="/tags/vue/" 
        title="vue">
        <div class="tags-list-item">vue</div>
      </a>
    
      <a 
        href="/tags/%E9%9D%A2%E8%AF%95/" 
        title="面试">
        <div class="tags-list-item">面试</div>
      </a>
    
      <a 
        href="/tags/css/" 
        title="css">
        <div class="tags-list-item">css</div>
      </a>
    
      <a 
        href="/tags/%E7%BD%91%E7%BB%9C/" 
        title="网络">
        <div class="tags-list-item">网络</div>
      </a>
    
      <a 
        href="/tags/%E5%85%B6%E4%BB%96/" 
        title="其他">
        <div class="tags-list-item">其他</div>
      </a>
    
      <a 
        href="/tags/%E7%AE%97%E6%B3%95/" 
        title="算法">
        <div class="tags-list-item">算法</div>
      </a>
    
      <a 
        href="/tags/%E6%B5%8F%E8%A7%88%E5%99%A8/" 
        title="浏览器">
        <div class="tags-list-item">浏览器</div>
      </a>
    
      <a 
        href="/tags/html/" 
        title="html">
        <div class="tags-list-item">html</div>
      </a>
    
      <a 
        href="/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" 
        title="操作系统">
        <div class="tags-list-item">操作系统</div>
      </a>
    
      <a 
        href="/tags/%E8%80%83%E8%AF%95/" 
        title="考试">
        <div class="tags-list-item">考试</div>
      </a>
    
      <a 
        href="/tags/%E8%BD%AF%E5%AE%9E%E5%8A%9B/" 
        title="软实力">
        <div class="tags-list-item">软实力</div>
      </a>
    
      <a 
        href="/tags/DOM/" 
        title="DOM">
        <div class="tags-list-item">DOM</div>
      </a>
    
      <a 
        href="/tags/%E8%BD%AE%E5%AD%90/" 
        title="轮子">
        <div class="tags-list-item">轮子</div>
      </a>
    
      <a 
        href="/tags/%E7%BD%91%E7%BB%9C%E5%8E%9F%E7%90%86/" 
        title="网络原理">
        <div class="tags-list-item">网络原理</div>
      </a>
    
      <a 
        href="/tags/debug/" 
        title="debug">
        <div class="tags-list-item">debug</div>
      </a>
    
  </div>
</div>
  </article>
  
  
</div>
            </aside>
            <aside class="right-column">
              <div class="sticky-widescreen">
  
  
    <article class="card card-content toc-card">
      <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E8%BF%B0%EF%BC%9A"><span class="toc-text">概述：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A3%8B%E7%9B%98%E5%92%8C%E6%A3%8B%E5%AD%90%E7%9A%84%E7%BC%96%E7%A0%81%E7%BA%A6%E5%AE%9A%EF%BC%9A"><span class="toc-text">棋盘和棋子的编码约定：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B%EF%BC%9A"><span class="toc-text">协议使用示例：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%8F%E8%AE%AE%E6%8C%87%E4%BB%A4%E8%A7%A3%E9%87%8A%EF%BC%9A"><span class="toc-text">协议指令解释：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9"><span class="toc-text">注意事项</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%91%E5%B8%83%E6%97%B6%E9%97%B4%EF%BC%9A"><span class="toc-text">发布时间：</span></a></li></ol>
    </article>
  
  
  <article class="card card-content">
    <div class="recent-posts-card">
  <div class="recent-posts-header">
    <i 
      class="iconfont icon-wenzhang_huaban" 
      style="padding-right: 2px;">
    </i>最近文章
  </div>
  <div class="recent-posts-list">
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2022-05-01</div>
        <a href="/2022/05/01/typescriptHome/"><div class="recent-posts-item-content">typescript</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2022-01-15</div>
        <a href="/2022/01/15/javaScriptTheVariousWaysAndAdvantagesAndDisadvantagesOfDeepInheritance/"><div class="recent-posts-item-content">JavaScript深入之继承的多种方式和优缺点</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2022-01-15</div>
        <a href="/2022/01/15/javaScriptGoFromPrototypeToPrototypeChain/"><div class="recent-posts-item-content">JavaScript深入之从原型到原型链</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2022-01-15</div>
        <a href="/2022/01/15/javaScriptMemoryLeakTutorial/"><div class="recent-posts-item-content">JavaScript 内存泄漏教程</div></a>
      </div>
    
  </div>
</div>
  </article>
  
  
  
  <article class="card card-content">
    <div class="recent-posts-card">
  <div class="recent-posts-header">
    关注嘉然！顿顿解馋！
  </div>
  <div class="recent-posts-list">
    
      <img 
        src="https://api2.mubu.com/v3/document_image/2697c6ae-10ee-41a3-9099-304bdb252d31-3807603.jpg" 
        class="myadd-img" 
        alt="author avatar">
    
  </div>
</div>
  </article>
</div>
            </aside>
          </div>
        </div>
      </div>
    </div>
     
    <footer class="footer">
  <div class="footer-container">
    <div>
      <div class="footer-dsc">
        <span>
          Copyright ©
          
            2020 -
          
          2022
        </span>
        &nbsp;
        <a 
          href="/" 
          class="footer-link">
          霜序廿的个人网站
        </a>
      </div>
    </div>

    
      <div class="footer-dsc">
        
          Powered by
          <a 
            href="https://hexo.io/" 
            class="footer-link" 
            target="_blank" 
            rel="nofollow noopener noreferrer">
            &nbsp;Hexo
          </a>
        
        
          <span>&nbsp;|&nbsp;</span>
        
        
          Theme -
          <a 
            href="https://github.com/theme-kaze" 
            class="footer-link" 
            target="_blank"
            rel="nofollow noopener noreferrer">
            &nbsp;Kaze
          </a>
        
      </div>
    
    
    
    
</footer> 
    
  <a 
    role="button" 
    id="scrollbutton" 
    class="basebutton" 
    aria-label="回到顶部">
    <i class="iconfont icon-arrowleft button-icon"></i>
  </a>

<a 
  role="button" 
  id="menubutton" 
  class="basebutton">
  <i class="iconfont icon-menu button-icon"></i>
</a>
<a 
  role="button" 
  id="popbutton" 
  class="basebutton" 
  aria-label="控制中心">
  <i class="iconfont icon-expand button-icon"></i>
</a>
<a 
  role="button" 
  id="darkbutton" 
  class="basebutton darkwidget" 
  aria-label="夜色模式">
  <i class="iconfont icon-weather button-icon"></i>
</a>
<a 
  role="button" 
  id="searchbutton" 
  class="basebutton searchwidget" 
  aria-label="搜索">
  <i class="iconfont icon-search button-icon"></i>
</a> 
     
     
     
      <script>
  var addImgLayout = function () {
    var img = document.querySelectorAll('.post-content img')
    var i
    for (i = 0; i < img.length; i++) {
      var wrapper = document.createElement('a')
      wrapper.setAttribute('href', img[i].getAttribute('data-src'))
      wrapper.setAttribute('aria-label', 'illustration')
      wrapper.style.cssText =
        'width: 100%; display: flex; justify-content: center;'
      if (img[i].alt) wrapper.dataset.caption = img[i].alt
      wrapper.dataset.nolink = true
      img[i].before(wrapper)
      wrapper.append(img[i])
      var divWrap = document.createElement('div')
      divWrap.classList.add('gallery')
      wrapper.before(divWrap)
      divWrap.append(wrapper)
    }
    baguetteBox.run('.gallery')
  }
</script>
<script>
  loadScript(
    "/js/lib/lightbox/baguetteBox.min.js",
    addImgLayout
  )
</script>
 
     
     
    <script src="/js/main.js"></script> 
     
    
      <script>
        var addLazyload = function () {
          var observer = lozad('.lozad', {
            load: function (el) {
              el.srcset = el.getAttribute('data-src')
            },
            loaded: function (el) {
              el.classList.add('loaded')
            },
          })
          observer.observe()
        }
      </script>
      <script>
        loadScript('/js/lib/lozad.min.js', addLazyload)
      </script>
     
    
    
  </body>
</html>
